    import React from 'react';
    import ReactDOM from 'react-dom/client';
    import reportWebVitals from './reportWebVitals';
    import '@ant-design/v5-patch-for-react-19';
    import {App} from './views/App';
    import store  from "./store";//react-redux的store
    import {store as mobxStore} from './store/mobx';
    import {Provider as ReactReduxProvider} from 'react-redux';
    import toolKitStore from './store/toolkit';
    import {Provider as MobxProvider} from 'mobx-react';
    import MobxEncapsulationComp from "./study/mobx/MobxEncapsulationComp";
    const root = ReactDOM.createRoot(document.getElementById('root'));
    const storeType = "toolkit" ;//react-redux/mobx/toolkit 取决用的是哪个store
    if (!new class { x }().hasOwnProperty('x')) throw new Error('Transpiler is not configured correctly');
    if(['react-redux','toolkit'].includes(storeType)){
        //用ReactReduxProvider
        root.render(
            <>
                <ReactReduxProvider store={toolKitStore}>
                    <App/>
                </ReactReduxProvider>
            </>
        )
    }else {
        root.render(
            <>
                {/*等价于 vote={mobxStore.vote} personal={mobxStore.personal}/>*/}
                <MobxProvider {...mobxStore}>
                    <MobxEncapsulationComp/>
                </MobxProvider>
            </>
        )
    }


    // If you want to start measuring performance in your app, pass a function
    // to log results (for example: reportWebVitals(console.log))
    // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
    reportWebVitals();
